Skip to content

feat: bundle esm + cjs variants of runtime packages using tsdown#452

Merged
mnahkies merged 4 commits intomainfrom
mn/feat/tsdown
May 3, 2026
Merged

feat: bundle esm + cjs variants of runtime packages using tsdown#452
mnahkies merged 4 commits intomainfrom
mn/feat/tsdown

Conversation

@mnahkies
Copy link
Copy Markdown
Owner

@mnahkies mnahkies commented May 3, 2026

adopts the use of https://tsdown.dev/ to bundle the runtime packages as distinct CJS and ESM distributions.

increasingly, we've run into issues where mixing and matching ESM/CJS creates annoying build errors, such as the axios type-mismatches between their CJS and ESM typings that we had to patch out.

similar issues occurred whilst updating @koa/router to v15, and so decided it was time to address.

the primary downside, is that the dist files will no longer mirror the src structure.

this will require careful testing of package publishing and installation to ensure there are no regressions prior to release.

@mnahkies mnahkies changed the title feat: bundle esm + cjs variants of runtmie packages using tsdown feat: bundle esm + cjs variants of runtime packages using tsdown May 3, 2026
@mnahkies mnahkies merged commit 7a6dc89 into main May 3, 2026
16 checks passed
@mnahkies mnahkies deleted the mn/feat/tsdown branch May 3, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant